package com.cj.demo3.service.impl;

import com.chenju.zuoye1.mapper.StudentMapper;
import com.chenju.zuoye1.pojo.Student;
import com.chenju.zuoye1.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    StudentMapper studentMapper;
    @Override
    public List<Student> findAll() {

        return studentMapper.findAll();

    }

    @Override
    public Student findById(Integer cid) {
        return studentMapper.findById(cid);
    }

    @Override
    public Student update(Student student) {
        return studentMapper.update(student);
    }

    @Override
    public Student delete(Integer cid) {
        return studentMapper.delete(cid);
    }

    @Override
    public Student save(Student student) {
        return studentMapper.save(student);
    }
}
